package de.clapp.client;

import java.util.ArrayList;

import de.clapp.client.menue.MenueCardPanel;
import de.clapp.panels.MyTabbedPanel;

public class Model
{
    private ArrayList<MyTabbedPanel> observerlist;
    private String test = "test";
    
    public Model()
    {
        this.observerlist = new ArrayList<MyTabbedPanel>();
    }
    
    public void addObserver(MyTabbedPanel view)
    {
        this.observerlist.add(view);
    }
    
    public void menueNeu()
    {
        for (MyTabbedPanel view : this.observerlist)
        {
            if(view.getClass().getName().contains("MenueCardPanel"))
            {
                ((MenueCardPanel) view).addRow();
            }
        }
    }
    
    public void menueLoeschen()
    {
        for (MyTabbedPanel view : this.observerlist)
        {
            if(view.getClass().getName().contains("MenueCardPanel"))
            {
                ((MenueCardPanel) view).deleteRow();
            }
        }
    }
    
    public void menueSpeichern()
    {
        
    }
   
    public void boerseArtikelDetailsUpdate()
    {
        
    }

    public void fireModelChanged()
    {
        
    }
}
